#include <stdio.h>
#include <stdlib.h>

char my_toupper(char ch)
{
    if (ch >= 'a' && ch <= 'z')
    {
        ch = ch - 'a' + 'A';
        printf("小写转大写\n");
    }
    else if (ch >= 'A' && ch <= 'Z')
    {
        ch = ch - 'A' + 'a';
        printf("大写转小写\n");
    }
    return ch;
}

int main(int argc, char **argv)
{
    char zimu;
    if (argc != 2)
    {
        printf("Error: incorrect parameters. Usage: <program> <character>\n");
        return 0;
    }
    zimu = my_toupper(*argv[1]);
    printf("ch = %c\n", zimu);
    return 0;
}
